package com.pic.mgt.dao.haishin;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.pic.mgt.dao.IBasicDao;


public interface IAppointedHaishinBusinessAsgmtActionDao extends IBasicDao {
	// table 內的欄位名稱
	public static final String _targetFile = "target_file";
	public static final String _unitName = "unit_name";
	public static final String _terminalId = "terminal_id";
	public static final String _asgmtFilename = "asgmt_file_name";
	public static final String _asgmtFilesize = "asgmt_file_size";
	public static final String _result = "result";
	public static final String _lastTxTime = "last_transaction_time";
	public static final String _creatingTime = "creating_time";
	
	public int updateLastTxTimeByTxFilename(Timestamp lastTransactionTime, 
										    String txFilename)
								throws DataAccessException;
	
	public List<HaishinBusinessAsgmtActionInfoBean> findHaishinBasicBusinessAsgmtActionInfoListByUnitNameWithOrderByCreatingTimeDESC(String unitName)
	throws DataAccessException;
	
	public HaishinBusinessAsgmtActionInfoBean findHaishinBasicBusinessAsgmtActionInfoByAsgmtFilename(String asgmtFilename) throws DataAccessException; 
	
	public HaishinBusinessAsgmtActionInfoBean findHaishinBasicBusinessAsgmtActionInfoByUnitNameAndTerminalId(String unitName, String terminalId)
	throws DataAccessException;
	
	public int updateCreatingTimeByAsgmtFilename(Timestamp creatTime, String unitName) throws DataAccessException;
}
